﻿@model WebApplication.Models.ServerObjectModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_ModalWindowLayout.cshtml";
}

<h2>@Model.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="../../Scripts/My/ButterFlyControl.js"></script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Редактирование объекта</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.IdCustomization)
        @Html.HiddenFor(model => model.IdServer)
        @Html.HiddenFor(model => model.IdBuildParameter)
        @Html.HiddenFor(model => model.IdDeployParameter)
        @Html.HiddenFor(model => model.IdSvnParameter)
        @Html.HiddenFor(model => model.IdType)
        <div class="editor-label">
            Имя объекта
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            Кастомизация
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.CustomizationXml, new { rows = 15, cols = 15 })
            @Html.ValidationMessageFor(model => model.CustomizationXml)
        </div>

        <div class="editor-label">
            Параметры компиляции
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BuildParameters)
            @Html.ValidationMessageFor(model => model.BuildParameters)
        </div>

        <div class="editor-label">
            Параметры развертывания
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DeployParameters)
            @Html.ValidationMessageFor(model => model.DeployParameters)
        </div>

        <div class="editor-label">
            Адрес репозитория
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SrcUrl)
            @Html.ValidationMessageFor(model => model.SrcUrl)
        </div>

        <div class="editor-label">
            Имя пользователя для репозитория
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SvnUserName)
            @Html.ValidationMessageFor(model => model.SvnUserName)
        </div>

        <div class="editor-label">
            Пароль для репозитория
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SvnUserPassword)
            @Html.ValidationMessageFor(model => model.SvnUserPassword)
        </div>

        <div class="editor-label">
            Номер ревизии
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SvnRevision)
            @Html.ValidationMessageFor(model => model.SvnRevision)
        </div>

        <div class="editor-label">
            Имя главного файла
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MainCsProjFile)
            @Html.ValidationMessageFor(model => model.MainCsProjFile)
        </div>

        <div>

            @Html.ListBox("allNotifications")
            <span id="butterInLeft"><<</span>
            <span id="butterInRight">>></span>
            @Html.ListBox("appNotifications")
        </div>
          <p>
            <input type="submit" value="Сохранить" onclick="" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Назад", "ShowObject", new { id = Model.Id })
</div>
